-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #537 from wdeconinck/production_DE_fixup
Make async_threads_module and fesom_C an OBJECT library
- Loading branch information
Showing
5 changed files
with
20 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,17 @@ | ||
cmake_minimum_required(VERSION 3.4) | ||
cmake_minimum_required(VERSION 3.16) | ||
|
||
project(async_threads_cpp CXX C Fortran) # the FortranCInterface requires the C language to be enabled | ||
|
||
set (CMAKE_CXX_STANDARD 11) | ||
|
||
# get our source files | ||
file(GLOB sources_CXX ${CMAKE_CURRENT_LIST_DIR}/*.cpp) | ||
file(GLOB sources ${CMAKE_CURRENT_LIST_DIR}/*.cpp) | ||
|
||
include(FortranCInterface) | ||
FortranCInterface_HEADER(ThreadsManagerFCMacros.h MACRO_NAMESPACE "ThreadsManagerFCMacros_" SYMBOLS init_ccall begin_ccall end_ccall) | ||
|
||
add_library(${PROJECT_NAME} ${sources_CXX}) | ||
|
||
add_library(${PROJECT_NAME} OBJECT ${sources}) | ||
target_include_directories(${PROJECT_NAME} | ||
PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}> | ||
PUBLIC $<BUILD_INTERFACE:${CMAKE_Fortran_MODULE_DIRECTORY}> | ||
) | ||
|
||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL Cray ) | ||
target_compile_options(${PROJECT_NAME} PRIVATE -hstd=c++11) | ||
else() | ||
target_compile_options(${PROJECT_NAME} PRIVATE -std=c++11) | ||
endif() | ||
if(${BUILD_FESOM_AS_LIBRARY}) | ||
target_compile_options(${PROJECT_NAME} PRIVATE -fPIC) | ||
install(TARGETS ${PROJECT_NAME} DESTINATION "${FESOM_INSTALL_PREFIX}/lib") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters