Skip to content

Commit f06de24

Browse files
committed
Apply reviewer feedback
Signed-off-by: Danila Fedorin <daniel.fedorin@hpe.com>
1 parent c31e72d commit f06de24

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

doc/rst/usingchapel/compiling.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

util/cmake/CMakeCHPLInformation.cmake

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
set(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}")
2526
if(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()

0 commit comments

Comments
 (0)