-
Notifications
You must be signed in to change notification settings - Fork 38
Respect CMAKE_EXE_LINKER_FLAGS/CMAKE_SHARED_LINKER_FLAGS flags set via CLI #830
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,7 +84,8 @@ endif | |
|
||
CXXFLAGS = @CORENRN_CXX_FLAGS@ | ||
CXX_COMPILE_CMD = $(CXX) $(CXXFLAGS) @CMAKE_CXX_COMPILE_OPTIONS_PIC@ @CORENRN_COMMON_COMPILE_DEFS@ $(INCLUDES) | ||
CXX_LINK_EXE_CMD = $(CXX) $(CXXFLAGS) @CMAKE_EXE_LINKER_FLAGS@ | ||
CXX_LINK_EXE_CMD = $(CXX) $(CXXFLAGS) | ||
CXX_LINK_EXE_FLAGS = @CMAKE_EXE_LINKER_FLAGS@ | ||
CXX_SHARED_LIB_CMD = $(CXX) $(CXXFLAGS) @CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS@ @CMAKE_SHARED_LIBRARY_CXX_FLAGS@ @CMAKE_SHARED_LINKER_FLAGS@ | ||
|
||
# ISPC compilation and link commands | ||
|
@@ -210,9 +211,9 @@ endif | |
# main target to build binary | ||
$(SPECIAL_EXE): coremech_lib_target | ||
@printf " => $(C_GREEN)Binary$(C_RESET) creating $(SPECIAL_EXE)\n" | ||
$(CXX_LINK_EXE_CMD) -o $(SPECIAL_EXE) $(CORENRN_SHARE_CORENRN_DIR)/coreneuron.cpp \ | ||
$(CXX_LINK_EXE_CMD) -o $(SPECIAL_EXE) $(CORENRN_SHARE_CORENRN_DIR)/coreneuron.cpp \ | ||
-I$(CORENRN_INC_DIR) $(INCFLAGS) \ | ||
-L$(OUTPUT_DIR) -l$(COREMECH_LIB_NAME) $(CORENRNLIB_FLAGS) $(LDFLAGS) \ | ||
-L$(OUTPUT_DIR) -l$(COREMECH_LIB_NAME) $(CORENRNLIB_FLAGS) $(LDFLAGS) $(CXX_LINK_EXE_FLAGS) \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As far as I can see the changes to this file just re-order some flags. Is that important? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I now see the commit message about it needing to be later. Can you add a comment/documentation about that issue/detail? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, I should have put this PR in draft - haven't thoroughly checked how/why |
||
-Wl,-rpath,'$(LIB_RPATH)' -Wl,-rpath,$(CORENRN_LIB_DIR) -Wl,-rpath,'$(INSTALL_LIB_RPATH)' | ||
|
||
coremech_lib_target: $(corenrnmech_lib_target) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use https://cmake.org/cmake/help/latest/command/string.html#append to avoid repeating the variable name, I think, but no big deal.