This repository was archived by the owner on Mar 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 41
CMake build options refactoring for Makefile #455
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
ed2250a
CMake build options refactoring for Makefile
pramodk 31e116d
Change to latest NVHPC
pramodk ddc7ebc
fix ISPC build issue and nrnivmodl-core failure on OSX
pramodk 4bbe8ef
Avoid P2 UC2 ndoes as GPFS is not mounted (HELP-13390)
pramodk 71c4a57
Issue with unified memory and cuda driver compatibility - downgrade m…
pramodk 316c126
Issue with PGI compiler due to makelocalrc on jenkins
pramodk 76d5d9d
back to nvhpc 20.9 as PGI 19.10 doesn't work with current GPU driver
pramodk 38323e4
use spack branch only if specified
pramodk c6526e2
try same version as master
pramodk 29ed9a4
minimize builds
pramodk fbfa72d
use nvhpc/20.9 cuda/10.1.243
pramodk 631f04c
move to archive
pramodk 053d73f
Remove use of PG_ACC_BUGS
pramodk 059c1fb
revert temporary changes
pramodk 68b42b9
update mod2c to master
pramodk 57f13d8
use archive modules again
pramodk d6e909c
mods files and cpp translated files are in same x86_64/corenrn/mod2c …
pramodk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# ============================================================================= | ||
# Common CXX and ISPC flags | ||
# ============================================================================= | ||
|
||
# ISPC should compile with --pic by default | ||
set(CMAKE_ISPC_FLAGS "${CMAKE_ISPC_FLAGS} --pic") | ||
|
||
# ============================================================================= | ||
# NMODL CLI options : common and backend specific | ||
# ============================================================================= | ||
# if user pass arguments then use those as common arguments | ||
if ("${CORENRN_NMODL_FLAGS}" STREQUAL "") | ||
set(NMODL_COMMON_ARGS "passes --inline") | ||
else() | ||
set(NMODL_COMMON_ARGS ${CORENRN_NMODL_FLAGS}) | ||
endif() | ||
|
||
set(NMODL_CPU_BACKEND_ARGS "host --c") | ||
set(NMODL_ISPC_BACKEND_ARGS "host --ispc") | ||
set(NMODL_ACC_BACKEND_ARGS "host --c acc --oacc") | ||
|
||
# ============================================================================= | ||
# Extract Compile definitions : common to all backend | ||
# ============================================================================= | ||
get_directory_property(COMPILE_DEFS COMPILE_DEFINITIONS) | ||
if(COMPILE_DEFS) | ||
set(CORENRN_COMMON_COMPILE_DEFS "") | ||
foreach(flag ${COMPILE_DEFS}) | ||
set(CORENRN_COMMON_COMPILE_DEFS "${CORENRN_COMMON_COMPILE_DEFS} -D${flag}") | ||
endforeach() | ||
endif() | ||
|
||
# ============================================================================= | ||
# link flags : common to all backend | ||
# ============================================================================= | ||
# ~~~ | ||
# find_cuda uses FindThreads that adds below imported target we | ||
# shouldn't add imported target to link line | ||
# ~~~ | ||
list(REMOVE_ITEM CORENRN_LINK_LIBS "Threads::Threads") | ||
|
||
# replicate CMake magic to transform system libs to -l<libname> | ||
foreach(link_lib ${CORENRN_LINK_LIBS}) | ||
if(${link_lib} MATCHES "\-l.*") | ||
string(APPEND CORENRN_COMMON_LDFLAGS " ${link_lib}") | ||
continue() | ||
endif() | ||
get_filename_component(path ${link_lib} DIRECTORY) | ||
if(NOT path) | ||
string(APPEND CORENRN_COMMON_LDFLAGS " -l${link_lib}") | ||
elseif("${path}" MATCHES "^(/lib|/lib64|/usr/lib|/usr/lib64)$") | ||
get_filename_component(libname ${link_lib} NAME_WE) | ||
string(REGEX REPLACE "^lib" "" libname ${libname}) | ||
string(APPEND CORENRN_COMMON_LDFLAGS " -l${libname}") | ||
else() | ||
string(APPEND CORENRN_COMMON_LDFLAGS " ${link_lib}") | ||
endif() | ||
endforeach() | ||
|
||
# ============================================================================= | ||
# compile flags : common to all backend | ||
# ============================================================================= | ||
# PGI compiler adds --c++14;-A option for C++14, remove ";" | ||
string(REPLACE ";" " " CXX14_STD_FLAGS "${CMAKE_CXX14_STANDARD_COMPILE_OPTION}") | ||
string(TOUPPER "${CMAKE_BUILD_TYPE}" _BUILD_TYPE) | ||
set(CORENRN_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${_BUILD_TYPE}} ${CXX14_STD_FLAGS}") | ||
|
||
# ============================================================================= | ||
# nmodl/mod2c related options : TODO | ||
# ============================================================================= | ||
# name of nmodl/mod2c binary | ||
get_filename_component(nmodl_name ${CORENRN_MOD2CPP_BINARY} NAME) | ||
set(nmodl_binary_name ${nmodl_name}) |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Submodule mod2c
updated
10 files
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.