Skip to content

CMake build fixes - #150

Closed
IRainman wants to merge 1 commit into
vitaut:mainfrom
IRainman:CMake
Closed

IRainman wants to merge 1 commit into
vitaut:mainfrom
IRainman:CMake

Conversation

@IRainman

Copy link
Copy Markdown
Contributor

No description provided.

@IRainman IRainman left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it is.

Comment thread test/CMakeLists.txt
Comment on lines +1 to +3
cmake_minimum_required(VERSION 3.16)
project(zmij CXX C)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This is incorrect: test is a subdirectory, not a subproject.

Comment thread test/CMakeLists.txt
Comment on lines +55 to +57
if (MSVC)
message(STATUS "Skipping zmij-c-test on MSVC due to C compiler limitations with complex initializers")
else ()

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

We shouldn't be disabling tests. If there is a problem, please submit an issue or, better, a PR to fix it.

Comment thread test/CMakeLists.txt
Comment on lines +20 to +21
# Link against the zmij library and test helpers.
target_link_libraries(${name} PRIVATE dragonbox gtest fmt zmij)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

This is incorrect for implementation tests, please revert.

Comment thread test/CMakeLists.txt
add_executable(float-check float-check.cc)
target_compile_features(float-check PRIVATE ${ZMIJ_CHECK_STANDARD})
target_link_libraries(float-check fmt dragonbox zmij)
target_link_libraries(float-check PRIVATE fmt dragonbox zmij)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

I don't think we need PRIVATE for binaries.

@vitaut vitaut closed this Sep 4, 2026
@IRainman
IRainman deleted the CMake branch September 13, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants