mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 20:20:48 -06:00
Moved Linux directives into ifdef
Use INSTALL_ERT to control shared/static library type on non-MSVC p4#: 21478
This commit is contained in:
parent
ca856f7603
commit
5cc4c9a231
16
ThirdParty/Ert/devel/CMakeLists.txt
vendored
16
ThirdParty/Ert/devel/CMakeLists.txt
vendored
@ -19,13 +19,14 @@ ENABLE_TESTING()
|
||||
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
set(ERT_LINUX TRUE )
|
||||
add_definitions( -DERT_LINUX )
|
||||
set( CMAKE_C_FLAGS "-g -O2 -Wall -std=gnu99" )
|
||||
set( CMAKE_CXX_FLAGS "-g -O2 -Wall" )
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
|
||||
set(ERT_WINDOWS TRUE)
|
||||
add_definitions( -DERT_WINDOWS )
|
||||
endif()
|
||||
|
||||
set( CMAKE_C_FLAGS "-g -O2 -Wall -std=gnu99" )
|
||||
set( CMAKE_CXX_FLAGS "-g -O2 -Wall" )
|
||||
set( CMAKE_C_FLAGS "-O2" )
|
||||
set( CMAKE_CXX_FLAGS "-O2" )
|
||||
endif()
|
||||
|
||||
include(cmake/ert_check.cmake)
|
||||
include(cmake/ert_find.cmake)
|
||||
@ -39,9 +40,14 @@ if (MSVC)
|
||||
set( LIBRARY_TYPE STATIC )
|
||||
set( SHARED_LIB OFF )
|
||||
else()
|
||||
if (INSTALL_ERT)
|
||||
set( LIBRARY_TYPE SHARED )
|
||||
set( SHARED_LIB ON )
|
||||
endif()
|
||||
else()
|
||||
set( LIBRARY_TYPE STATIC )
|
||||
set( SHARED_LIB OFF )
|
||||
endif(INSTALL_ERT)
|
||||
endif(MSVC)
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user