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

[glm] Modernization #29314

Merged
merged 2 commits into from
Jan 31, 2023
Merged

[glm] Modernization #29314

merged 2 commits into from
Jan 31, 2023

Conversation

xiaozhuai
Copy link
Contributor

  1. Modernization
  2. Add license

github-actions[bot]
github-actions bot previously approved these changes Jan 31, 2023
@JonLiu1993 JonLiu1993 added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Jan 31, 2023
@JonLiu1993
Copy link
Member

The usage test failed, the details are as follows:

1)Configure CMake project:

1> [CMake] CMake Error at F:/Feature-test/glm/vcpkg/scripts/buildsystems/vcpkg.cmake:843 (_find_package):
1> [CMake]   Could not find a package configuration file provided by "glm" with any of
1> [CMake]   the following names:
1> [CMake] 
1> [CMake]     glmConfig.cmake
1> [CMake]     glm-config.cmake

CMakeProject42.cpp

#include <iostream>
#include "glm/common.hpp"

int main()
{
cout << "Hello CMake." << endl;
return 0;
}

CMakeLists.txt
cmake_minimum_required (VERSION 3.8)

project(test)

find_package(glm CONFIG REQUIRED)
add_executable (main "CMakeProject42.cpp" "CMakeProject42.h")
target_link_libraries(main PRIVATE glm::glm)

@xiaozhuai
Copy link
Contributor Author

The usage test failed, the details are as follows:

This is odd, is ok on my machine.

cmake_minimum_required(VERSION 3.24)
project(test_glm)

set(CMAKE_CXX_STANDARD 14)

find_package(glm CONFIG REQUIRED)

add_executable(test_glm main.cpp)

target_link_libraries(test_glm PRIVATE glm::glm)
#include <iostream>
#include <glm/common.hpp>

int main() {
    std::cout << "Hello, World!" << std::endl;
    return 0;
}

@xiaozhuai
Copy link
Contributor Author

1> [CMake] CMake Error at F:/Feature-test/glm/vcpkg/scripts/buildsystems/vcpkg.cmake:843 (_find_package):
1> [CMake]   Could not find a package configuration file provided by "glm" with any of
1> [CMake]   the following names:
1> [CMake] 
1> [CMake]     glmConfig.cmake
1> [CMake]     glm-config.cmake

Maybe your CMAKE_TOOLCHAIN_FILE is not set correctly?

@xiaozhuai
Copy link
Contributor Author

glm has some downstream port, If this error occured, CI wouldn't pass.

@JonLiu1993
Copy link
Member

JonLiu1993 commented Jan 31, 2023

I deleted the cache and re-authenticated it successfully.

1> CMake generation started for configuration: 'x64-Debug'.
1> Command line: "C:\WINDOWS\system32\cmd.exe" /c "%SYSTEMROOT%\System32\chcp.com 65001 >NUL && "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\ENTERPRISE\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\CMAKE\CMake\bin\cmake.exe"  -G "Visual Studio 16 2019" -A x64  -DCMAKE_CONFIGURATION_TYPES:STRING="Debug" -DCMAKE_INSTALL_PREFIX:PATH="C:\Users\test\source\repos\CMakeProject42\out\install\x64-Debug" -DCMAKE_TOOLCHAIN_FILE=F:/Feature-test/glm/vcpkg/scripts/buildsystems/vcpkg.cmake "C:\Users\test\source\repos\CMakeProject42" 2>&1"
1> Working directory: C:\Users\test\source\repos\CMakeProject42\out\build\x64-Debug
1> [CMake] -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19045.
1> [CMake] -- The C compiler identification is MSVC 19.29.30146.0
1> [CMake] -- The CXX compiler identification is MSVC 19.29.30146.0
1> [CMake] -- Detecting C compiler ABI info
1> [CMake] -- Detecting C compiler ABI info - done
1> [CMake] -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting C compile features
1> [CMake] -- Detecting C compile features - done
1> [CMake] -- Detecting CXX compiler ABI info
1> [CMake] -- Detecting CXX compiler ABI info - done
1> [CMake] -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
1> [CMake] -- Detecting CXX compile features
1> [CMake] -- Detecting CXX compile features - done
1> [CMake] -- Configuring done
1> [CMake] -- Generating done
1> [CMake] -- Build files have been written to: C:/Users/test/source/repos/CMakeProject42/out/build/x64-Debug
1> Extracted CMake variables.
1> Extracted source files and headers.
1> Extracted code model.
1> Extracted toolchain configurations.
1> Extracted includes paths.
1> CMake generation finished.

Build:

>------ Build All started: Project: CMakeProject42, Configuration: x64-Debug ------
  Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
  Copyright (C) Microsoft Corporation. All rights reserved.
  
    Checking Build System
    Building Custom Rule C:/Users/test/source/repos/CMakeProject42/CMakeProject42/CMakeLists.txt
    CMakeProject42.cpp
    main.vcxproj -> C:\Users\test\source\repos\CMakeProject42\out\build\x64-Debug\CMakeProject42\Debug\main.exe
    Building Custom Rule C:/Users/test/source/repos/CMakeProject42/CMakeLists.txt

Build All succeeded.

@JonLiu1993 JonLiu1993 added info:reviewed Pull Request changes follow basic guidelines and removed requires:author-response labels Jan 31, 2023
@BillyONeal BillyONeal merged commit 09c963e into microsoft:master Jan 31, 2023
@BillyONeal
Copy link
Member

Thanks for the modernization!

@xiaozhuai xiaozhuai deleted the dev-glm branch February 1, 2023 02:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants