File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -253,4 +253,4 @@ the module structure of the project. For example:
253253 mkdir build && cd build
254254 cmake .. -CMAKE_EXPORT_CHPL_COMMANDS=ON
255255 cmake --build .
256- cd .. && ln -s build/.cls_commands .json .cls_commands .json
256+ cd .. && ln -s build/.cls-commands .json .cls-commands .json
Original file line number Diff line number Diff line change 2121set (CMAKE_CHPL_COMPILE_OBJECT "test -f <OBJECT> || ln -s <SOURCE> <OBJECT>" )
2222
2323# Support for CMAKE_EXPORT_CHPL_COMMANDS (similar to CMAKE_EXPORT_COMPILE_COMMANDS)
24- set (CMAKE_CHPL_LINK_EXECUTABLE "<CMAKE_CHPL_COMPILER> -o <TARGET> <OBJECTS> <FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>" )
24+ set (CHPL_COMPILER_FLAGS "-o <TARGET> <OBJECTS> <FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>" )
25+ set (CMAKE_CHPL_LINK_EXECUTABLE "<CMAKE_CHPL_COMPILER> ${CHPL_COMPILER_FLAGS} " )
2526if (CMAKE_EXPORT_CHPL_COMMANDS)
2627 # Get the directory containing the chpl compiler to find chpl-shim
2728 get_filename_component (CHPL_BIN_DIR "${CMAKE_CHPL_COMPILER} " DIRECTORY )
@@ -32,8 +33,8 @@ if(CMAKE_EXPORT_CHPL_COMMANDS)
3233 if (EXISTS "${CHPL_SHIM_SCRIPT} " )
3334 # Use chpl-shim as a wrapper to generate .cls-commands.json
3435 # Note: chpl-shim expects to be called as 'chpl-shim chpl <args>', not with full path
35- message (STATUS "Using chpl-shim to generate .cls-commands.json" )
36- set (CMAKE_CHPL_LINK_EXECUTABLE "<CMAKE_COMMAND> -E env CHPL_SHIM_REAL_COMPILER_PATH=${CMAKE_CHPL_COMPILER} ${CHPL_SHIM_SCRIPT} chpl -o <TARGET> <OBJECTS> <FLAGS> <LINK_FLAGS> <LINK_LIBRARIES> " )
36+ message (STATUS "Found chpl-shim. Configuring build command to use chpl-shim to generate .cls-commands.json" )
37+ set (CMAKE_CHPL_LINK_EXECUTABLE "<CMAKE_COMMAND> -E env CHPL_SHIM_REAL_COMPILER_PATH=${CMAKE_CHPL_COMPILER} ${CHPL_SHIM_SCRIPT} chpl ${CHPL_COMPILER_FLAGS} " )
3738 else ()
3839 message (WARNING "CMAKE_EXPORT_CHPL_COMMANDS is set but chpl-shim not found at ${CHPL_SHIM_SCRIPT} " )
3940 endif ()
You can’t perform that action at this time.
0 commit comments