diff options
-rw-r--r-- | UserMacros.cmake | 39 | ||||
-rw-r--r-- | config/cmake/UserMacros/Windows_MT.cmake | 2 |
2 files changed, 11 insertions, 30 deletions
diff --git a/UserMacros.cmake b/UserMacros.cmake index bf609e5..d7d3ef9 100644 --- a/UserMacros.cmake +++ b/UserMacros.cmake @@ -3,34 +3,15 @@ ######################################################## #----------------------------------------------------------------------------- -# Option to Build with Static CRT libraries on Windows -#------------------------------------------------------------------------------- -MACRO (TARGET_STATIC_CRT_FLAGS) - IF (MSVC AND NOT BUILD_SHARED_LIBS) - FOREACH (flag_var - CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE - CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO - CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE - CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) - IF (${flag_var} MATCHES "/MD") - STRING (REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") - ENDIF (${flag_var} MATCHES "/MD") - ENDFOREACH (flag_var) - FOREACH (flag_var - CMAKE_Fortran_FLAGS CMAKE_Fortran_FLAGS_DEBUG CMAKE_Fortran_FLAGS_RELEASE - CMAKE_Fortran_FLAGS_MINSIZEREL CMAKE_Fortran_FLAGS_RELWITHDEBINFO) - IF (${flag_var} MATCHES "/libs:dll") - STRING (REGEX REPLACE "/libs:dll" "/libs:static" ${flag_var} "${${flag_var}}") - ENDIF (${flag_var} MATCHES "/libs:dll") - ENDFOREACH (flag_var) - SET (WIN_COMPILE_FLAGS "/MT") - SET (WIN_LINK_FLAGS "/NODEFAULTLIB:MSVCRT") - ENDIF (MSVC AND NOT BUILD_SHARED_LIBS) -ENDMACRO (TARGET_STATIC_CRT_FLAGS) - +# Option to Build with User Defined Values #----------------------------------------------------------------------------- -OPTION (BUILD_STATIC_CRT_LIBS "Build With Static CRT Libraries" OFF) -IF (BUILD_STATIC_CRT_LIBS) - TARGET_STATIC_CRT_FLAGS () -ENDIF (BUILD_STATIC_CRT_LIBS) +MACRO (MACRO_USER_DEFINED_LIBS) + SET (USER_DEFINED_VALUE "FALSE") +ENDMACRO (MACRO_USER_DEFINED_LIBS) + +#------------------------------------------------------------------------------- +OPTION (BUILD_USER_DEFINED_LIBS "Build With User Defined Values" OFF) +IF (BUILD_USER_DEFINED_LIBS) + MACRO_USER_DEFINED_LIBS () +ENDIF (BUILD_USER_DEFINED_LIBS)
\ No newline at end of file diff --git a/config/cmake/UserMacros/Windows_MT.cmake b/config/cmake/UserMacros/Windows_MT.cmake index 3bd1607..9be5404 100644 --- a/config/cmake/UserMacros/Windows_MT.cmake +++ b/config/cmake/UserMacros/Windows_MT.cmake @@ -26,7 +26,7 @@ MACRO (TARGET_STATIC_CRT_FLAGS) STRING (REGEX REPLACE "/libs:dll" "/libs:static" ${flag_var} "${${flag_var}}") ENDIF (${flag_var} MATCHES "/libs:dll") ENDFOREACH (flag_var) - SET (WIN_COMPILE_FLAGS "/MT") + SET (WIN_COMPILE_FLAGS "") SET (WIN_LINK_FLAGS "/NODEFAULTLIB:MSVCRT") ENDIF (MSVC AND NOT BUILD_SHARED_LIBS) ENDMACRO (TARGET_STATIC_CRT_FLAGS) |