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

PoC: Use MSVC without project files #1386

Open
t-mat opened this issue Mar 28, 2024 · 2 comments
Open

PoC: Use MSVC without project files #1386

t-mat opened this issue Mar 28, 2024 · 2 comments

Comments

@t-mat
Copy link
Contributor

t-mat commented Mar 28, 2024

MSVC project files (.sln and friends) have been our burden. Because their format, structure and convention have been (will be) changed randomly.

To ease this problem, I made a simple batch script which invokes cl.exe (MSVC compiler/linker driver) and rc.exe directly.

It's cumbersome, but its core is the following one line:

cl.exe %COMPILER_OPTIONS% %SRCS% /link %LINKER_OPTIONS% lz4.res

It passes compiler options, source files, linker options and resource file.

@t-mat
Copy link
Contributor Author

t-mat commented Mar 28, 2024

gist

Procedure:

cmd.exe
cd /d "%USERPROFILE%\Documents"
md lz4-issue-1386
cd lz4-issue-1386
git clone https://github.com/lz4/lz4.git
cd lz4

md build\visual_studio\lz4
cd build\visual_studio\lz4

copy ..\..\VS2022\lz4\lz4.rc .

curl -JOL https://gist.githubusercontent.com/t-mat/de819af37d3dd399147a75f9af1b034e/raw/build-vs2022.cmd
type build-vs2022.cmd | find "" /V > build-vs2022.cmd.bat
.\build-vs2022.cmd

.\lz4.exe --version

@Cyan4973
Copy link
Member

Yes, this is a good idea.

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

No branches or pull requests

2 participants