diff options
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/Clang-CXX.cmake | 4 | ||||
-rw-r--r-- | Modules/Compiler/Clang.cmake | 20 |
2 files changed, 16 insertions, 8 deletions
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake index 972d889..0372e18 100644 --- a/Modules/Compiler/Clang-CXX.cmake +++ b/Modules/Compiler/Clang-CXX.cmake @@ -1,4 +1,6 @@ include(Compiler/Clang) __compiler_clang(CXX) -set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") +if(NOT CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") + set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") +endif() diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake index ec4562a..7d7be5c 100644 --- a/Modules/Compiler/Clang.cmake +++ b/Modules/Compiler/Clang.cmake @@ -18,11 +18,17 @@ if(__COMPILER_CLANG) endif() set(__COMPILER_CLANG 1) -include(Compiler/GNU) +if(CMAKE_C_SIMULATE_ID STREQUAL "MSVC" + OR CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC") + macro(__compiler_clang lang) + endmacro() +else() + include(Compiler/GNU) -macro(__compiler_clang lang) - __compiler_gnu(${lang}) - set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE") - set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") - set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=") -endmacro() + macro(__compiler_clang lang) + __compiler_gnu(${lang}) + set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE") + set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") + set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=") + endmacro() +endif() |