aboutsummaryrefslogtreecommitdiff
path: root/cmake/Modules
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-12-29 20:02:03 +0100
committerAndreas Schneider <asn@cynapses.org>2010-12-29 20:02:03 +0100
commitd4a6c27a83b37a10aea5b36588f07fff562a896d (patch)
treeda75ec5e78d31435d63296db2c2e67db292a6d9e /cmake/Modules
parente7a06ad3b4f29f44db9a4e67908bcd330ff1e99b (diff)
downloadlibssh-d4a6c27a83b37a10aea5b36588f07fff562a896d.tar.gz
libssh-d4a6c27a83b37a10aea5b36588f07fff562a896d.tar.xz
libssh-d4a6c27a83b37a10aea5b36588f07fff562a896d.zip
cmake: Only set profile GCC flags on UNIX systems.
Diffstat (limited to 'cmake/Modules')
-rw-r--r--cmake/Modules/AddCMockeryTest.cmake10
1 files changed, 6 insertions, 4 deletions
diff --git a/cmake/Modules/AddCMockeryTest.cmake b/cmake/Modules/AddCMockeryTest.cmake
index ad08611..33a20b3 100644
--- a/cmake/Modules/AddCMockeryTest.cmake
+++ b/cmake/Modules/AddCMockeryTest.cmake
@@ -9,10 +9,12 @@
enable_testing()
include(CTest)
-set(CMAKE_C_FLAGS_PROFILING "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wwrite-strings -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Compiler Flags")
-set(CMAKE_SHARED_LINKER_FLAGS_PROFILING " -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Linker Flags")
-set(CMAKE_MODULE_LINKER_FLAGS_PROFILING " -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Linker Flags")
-set(CMAKE_EXEC_LINKER_FLAGS_PROFILING " -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Linker Flags")
+if(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW)
+ set(CMAKE_C_FLAGS_PROFILING "-g -O0 -Wall -W -Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wwrite-strings -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Compiler Flags")
+ set(CMAKE_SHARED_LINKER_FLAGS_PROFILING " -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Linker Flags")
+ set(CMAKE_MODULE_LINKER_FLAGS_PROFILING " -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Linker Flags")
+ set(CMAKE_EXEC_LINKER_FLAGS_PROFILING " -fprofile-arcs -ftest-coverage" CACHE STRING "Profiling Linker Flags")
+endif(CMAKE_COMPILER_IS_GNUCC AND NOT MINGW)
function (ADD_CMOCKERY_TEST _testName _testSource)
add_executable(${_testName} ${_testSource})