Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,17 @@ def test_cmake(self, test_dir, output_file, cmake_args):
if test_dir == 'post_build':
ret = self.run_process(['ctest'], env=env)

def test_cmake_executable_suffix(self):
# Setting CMAKE_EXECUTABLE_SUFFIX for some reason does not work from the command line.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it sound like the test is verifying an emscripten bug, but from your PR description this is the normal CMake behavior?

Suggested change
# Setting CMAKE_EXECUTABLE_SUFFIX for some reason does not work from the command line.
# CMake ignores CMAKE_EXECUTABLE_SUFFIX from the command line.

If it is a CMake bug perhaps link to it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the discussion in #22315 it seems like it not supposed to be set by the user at all.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sg, then maybe just remove "for some reason"?

self.run_process([EMCMAKE, 'cmake', test_file('cmake/hello'), '-DCMAKE_EXECUTABLE_SUFFIX=.html'])
self.run_process(['cmake', '--build', '.'])
self.assertNotExists('hello.html')

# Bet setting CMAKE_EXECUTABLE_SUFFIX_<LANG> does:
self.run_process([EMCMAKE, 'cmake', test_file('cmake/hello'), '-DCMAKE_EXECUTABLE_SUFFIX_C=.html'])
self.run_process(['cmake', '--build', '.'])
self.assertExists('hello.html')

# Test that the various CMAKE_xxx_COMPILE_FEATURES that are advertised for the Emscripten
# toolchain match with the actual language features that Clang supports.
# If we update LLVM version and this test fails, copy over the new advertised features from Clang
Expand Down