Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with Clang on Windows #470

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from
Draft

Build with Clang on Windows #470

wants to merge 11 commits into from

Conversation

macumber
Copy link
Collaborator

No description provided.

@macumber macumber changed the title Attempt to build with Clang on Windows Build with Clang on Windows Nov 29, 2021
@jmarrec
Copy link
Collaborator

jmarrec commented May 1, 2022

Is this ready for review? Looks like the clang MSVC runner failed. There are conflicts too apparently.

@macumber
Copy link
Collaborator Author

macumber commented May 1, 2022

No I didn't get this working yet, looks like I can't convert to draft PR because of the conflict

Comment on lines +498 to +503
cmake --build . -j 2 --config ${{ env.BUILD_TYPE }}
cmake --build . --target package -j 2 --config ${{ env.BUILD_TYPE }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

why?

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok, I haven't found a way to get that working either... When using ninja it's nearly impossible to pass a toolset without using a toolset file...

Comment on lines 38 to 44
if(WIN32)
# Use MSVC for dependencies on Windows
set(CMAKE_CXX_COMPILER_ID_TMP "${CMAKE_CXX_COMPILER_ID}")
set(CMAKE_CXX_COMPILER_ID "MSVC")
set(CMAKE_GENERATOR_TOOLSET_TMP "CMAKE_GENERATOR_TOOLSET")
set(CMAKE_GENERATOR_TOOLSET "")
endif()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hum, that makes me scared a bit.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not use ClangCL deps?

ConanInstall.cmake Outdated Show resolved Hide resolved
@jmarrec jmarrec marked this pull request as draft May 4, 2022 01:03
@jmarrec
Copy link
Collaborator

jmarrec commented May 5, 2022

  Building Custom Rule D:/a/OpenStudioApplication/OpenStudioApplication/ruby/CMakeLists.txt
lld-link : error : undefined symbol: __declspec(dllimport) int `public: static class Singleton<class openstudio::IddFactorySingleton>::IddFactorySingleton & __cdecl openstudio::Singleton<class openstudio::IddFactorySingleton>::instance(void)'::`2'::$TSS0 [D:\a\OpenStudioApplication\OpenStudioApplication\build\ruby\openstudio_modeleditor_rb.vcxproj]
  >>> referenced by openstudio_modeleditor.lib(InspectorDialog.obj):(private: void __cdecl InspectorDialog::init(class InspectorDialogClient))
  >>> referenced by openstudio_modeleditor.lib(InspectorDialog.obj):(private: void __cdecl InspectorDialog::init(class InspectorDialogClient))
  >>> referenced by openstudio_modeleditor.lib(InspectorDialog.obj):(private: void __cdecl InspectorDialog::init(class InspectorDialogClient))
  >>> referenced 6 more times
  
lld-link : error : undefined symbol: __declspec(dllimport) int `public: static class Singleton<class openstudio::LoggerSingleton>::LoggerSingleton & __cdecl openstudio::Singleton<class openstudio::LoggerSingleton>::instance(void)'::`2'::$TSS0 [D:\a\OpenStudioApplication\OpenStudioApplication\build\ruby\openstudio_modeleditor_rb.vcxproj]
  >>> referenced by openstudio_modeleditor.lib(InspectorDialog.obj):(void __cdecl boost::assertion_failed(char const *, char const *, char const *, long))
  >>> referenced by openstudio_modeleditor.lib(InspectorDialog.obj):(void __cdecl boost::assertion_failed(char const *, char const *, char const *, long))
  >>> referenced by openstudio_modeleditor.lib(InspectorDialog.obj):(int `void __cdecl boost::assertion_failed(char const *, char const *, char const *, long)'::`1'::dtor$58)
Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved

maybe need a UTILITIES_API on https://github.com/NREL/OpenStudio/blob/73c67b3969ab4963ecfacc735040d2b6dc99c931/src/utilities/core/Singleton.hpp#L40?

@jmarrec
Copy link
Collaborator

jmarrec commented May 5, 2022

@macumber FYI I had to force push and it was refusing to merge properly (shorthand MERGE_HEAD not found or whatever)

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