Add test for setting CMAKE_EXECUTABLE_SUFFIX from the command line#26244
Open
sbc100 wants to merge 1 commit intoemscripten-core:mainfrom
Open
Add test for setting CMAKE_EXECUTABLE_SUFFIX from the command line#26244sbc100 wants to merge 1 commit intoemscripten-core:mainfrom
sbc100 wants to merge 1 commit intoemscripten-core:mainfrom
Conversation
For some reason setting `CMAKE_EXECUTABLE_SUFFIX` from the command line does not work, even though settings `CMAKE_EXECUTABLE_SUFFIX_<LANG>` does work. This seems to be true regardless of what I do in the toolchain file. Its also true for native/host cmake. i.e. `-DCMAKE_EXECUTABLE_SUFFIX=.foo` has no effect but `-DCMAKE_EXECUTABLE_SUFFIX_C=.foo` works. Replaces: emscripten-core#22315
kripken
reviewed
Feb 11, 2026
| 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. |
Member
There was a problem hiding this comment.
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?
Collaborator
Author
There was a problem hiding this comment.
According to the discussion in #22315 it seems like it not supposed to be set by the user at all.
Member
There was a problem hiding this comment.
sg, then maybe just remove "for some reason"?
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
For some reason setting
CMAKE_EXECUTABLE_SUFFIXfrom the command line does not work, even though settingsCMAKE_EXECUTABLE_SUFFIX_<LANG>does work. This seems to be true regardless of what I do in the toolchain file. Its also true for native/host cmake.i.e.
-DCMAKE_EXECUTABLE_SUFFIX=.foohas no effect but-DCMAKE_EXECUTABLE_SUFFIX_C=.fooworks.Replaces: #22315