Explorar o código

Use "better" compiler checks

Apparently the MSVC variable is preferred. And apparently if is weird
about strings.
Bart van Strien %!s(int64=6) %!d(string=hai) anos
pai
achega
25c4bb99dc
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      src/CMakeLists.txt

+ 2 - 2
src/CMakeLists.txt

@@ -10,9 +10,9 @@ include_directories (
 )
 
 ### Compiler-specific flags
-if (${CMAKE_CXX_COMPILER_ID} MATCHES "MSVC")
+if (MSVC)
 	set (DLLEXPORT "__declspec(dllexport)")
-elseif (${CMAKE_CXX_COMPILER_ID} MATCHES "GNU" OR ${CMAKE_CXX_COMPILER_ID} MATCHES "Clang")
+elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
 	set (DLLEXPORT "__attribute__((visibility(\"default\")))")
 	add_compile_options ("-fvisibility=hidden")
 	add_link_options ("-fvisibility=hidden")