summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSander Vrijders <[email protected]>2017-04-07 12:14:09 +0200
committerSander Vrijders <[email protected]>2017-04-07 12:14:09 +0200
commit20d0532a4b1fd7568adf63654d023d782373873e (patch)
tree580153354f3018d08cd25d46b624bc3b4ff42300
parent3be1e036a7e2174ff0a1e0f3e603f0fc5eca42d2 (diff)
downloadouroboros-20d0532a4b1fd7568adf63654d023d782373873e.tar.gz
ouroboros-20d0532a4b1fd7568adf63654d023d782373873e.zip
build: Change compiler check output and update wrap
This removes some of the log messages spewed out during a check of a compiler flag. It also makes the SWIG compiler flag for C99 independent of the compiler.
-rw-r--r--cmake/CompilerUtils.cmake3
-rw-r--r--include/ouroboros/wrap/CMakeLists.txt2
2 files changed, 1 insertions, 4 deletions
diff --git a/cmake/CompilerUtils.cmake b/cmake/CompilerUtils.cmake
index fb81b7e7..b9fd391c 100644
--- a/cmake/CompilerUtils.cmake
+++ b/cmake/CompilerUtils.cmake
@@ -6,10 +6,7 @@ function(test_and_set_c_compiler_flag_global _flag)
check_c_compiler_flag(${_flag} COMPILER_SUPPORTS_FLAG_${_sflag})
if(COMPILER_SUPPORTS_FLAG_${_sflag})
- message(STATUS "Compiler supports flag ${_flag}, added globally")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flag}" PARENT_SCOPE)
- else(${_retval})
- message(STATUS "Compiler does not support flag ${_flag}, discarded")
endif()
endfunction(test_and_set_c_compiler_flag_global)
diff --git a/include/ouroboros/wrap/CMakeLists.txt b/include/ouroboros/wrap/CMakeLists.txt
index 7753ca02..fd9368e8 100644
--- a/include/ouroboros/wrap/CMakeLists.txt
+++ b/include/ouroboros/wrap/CMakeLists.txt
@@ -17,7 +17,7 @@ else ()
include_directories(${PYTHON_INCLUDE_PATH})
# Python assumes C99 since Python 3.6
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99")
+ test_and_set_c_compiler_flag_global(-std=c99)
swig_add_module(ouroboros python ouroboros.i)
swig_link_libraries(ouroboros ${PYTHON_LIBRARIES} ouroboros)